#!/usr/bin/env python
# -*- coding: utf-8 -*-

print 'Local Variable Demo'

def scope_test():
    local_variable = 6;
    print local_variable
    
scope_test()
local_variable=5   
print(local_variable)  
scope_test()  
print(local_variable) 

while True:
    newvar=8  
    print(newvar)  
    break 
  
print(newvar)  
  
try:  
    newlocal=7  
    raise Exception  
except:  
    print(newlocal)#可以直接使用哦 